<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>万漉国际-app下载</title>
    <link rel="stylesheet" href="./css/down.css">
</head>

<body>
    <div class="mainer">
        <div class="head-c">
            <h1>万漉国际</h1>
        </div>
        <div class="img-c">
            <img src="./images/step/icon.png" width="50px" height="50px" />
        </div>
        <div class="down-ewm">
            <img src="./images/step/ewm.png" width="120px" height="120px" />
        </div>
        <div class="down-c" style="margin-bottom: 50px;">
            <div class="down-btn" id="downapp">
                下载
            </div>
            <!-- <div class="down-tip" style="margin-bottom: 10px;">备注信息填写</div> -->
        </div>
        <div class="down-ios-detail" id="ios">
            <p class="note">注意:请在APP顺利安装完成后执行下面步骤</p>
            <ul>
                <li>
                    <div class="d-i-d-contain">
                        <h2>1,点击保存图片到相册</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step1_1.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>2,打开支付宝扫一扫保存到相册二维码,跳转到下面这个页面</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step1_2.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>3,用苹果手机打开浏览器Safari</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step1_3.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>4,点击免费安装,跳转到下面这个页面</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step1_4.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>5,点击允许,跳转到下面这个页面</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step1_5.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>6,点击同意,就安装成功</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step1_6.jpg" width="235px" />
                            <img src="./images/step/step1_6_1.jpg" width="235px" />
                        </div>
                    </div>
                </li>

            </ul>
        </div>
        <div class="down-ios-detail" id="android">
            <p class="note">注意:android安装过程被阻止，根据以下提示操作</p>
            <ul>
                <li>
                    <div class="d-i-d-contain">
                        <h2>会自动弹出对话框，点击设定</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step_a_1.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>在安全设置里面打开未知来源</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step_a_2.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>选择仅运行按照，然后确定</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step_a_3.jpg" width="235px" />
                        </div>
                    </div>
                </li>
                <li>
                    <div class="d-i-d-contain">
                        <h2>点击安装</h2>
                        <div class="d-i-d-c-img">
                            <img src="./images/step/step_a_4.jpg" width="235px" />
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <script src="https://code.jquery.com/jquery-1.12.4.min.js"
            integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
        <script type="text/javascript">
            $(function () {
                $("#downapp").click(function () {
                    downFun();
                });
                isShowDetail();
            })
            $(window).resize(function () {
                isShowDetail();
            });
            function isShowDetail() {
                if (isIosFun()) {
                    $("#ios").addClass("ios");
                    $("#android").removeClass("android");
                } else if (isAndroidFun()) {
                    $("#ios").removeClass("ios");
                    $("#android").addClass("android");
                } else {
                    $("#ios").removeClass("ios");
                    $("#android").removeClass("android");
                }
            }
            function is_weixin() {
                var ua = navigator.userAgent.toLowerCase();
                if (ua.match(/MicroMessenger/i) == "micromessenger") {
                    return true;
                } else {
                    return false;
                }
            }
            function isIosFun() {
                var app = app = window.navigator.appVersion;
                return app.match(/iphone/gi) || app.match(/ipad/gi) || app.match(/ipod/gi);
            }
            function isAndroidFun() {
                var u = window.navigator.userAgent;
                console.log(u);
                return u.indexOf('Android') > -1 || u.indexOf('Linux') > -1;
            }
            function downFun() {
                var isAndroid = isAndroidFun();
                var isIos = isIosFun();
                var isWeixin = is_weixin();
                if (isAndroid) {
                    //只是android能够下载
                    if (isWeixin) {
                        alert("通过浏览器形式打开");
                    } else {
                        //安卓下载地址
                        window.location.href = "https://dl.wanluhui1.com/app/wanluhui_dl_3rd.apk";
                    }
                } else if (isIos) {
                    if (isWeixin) {
                        alert("通过浏览器形式打开");
                    } else {
                        //ipa配置的下载plist的文件
                        window.location.href = "itms-services://?action=download-manifest&url=https://dl.wanluhui1.com/app/manifest_dl.plist";
                    }
                } else {
                    alert("请用手机浏览器访问");
                }
            }
        </script>
    </div>
</body>

</html>